﻿using AutoMapper;
using ERPPublic.eneity;
using ProcurementManagement.Domain.Dtos;
using ProcurementManagement.Domain.Dtos.PurchaseContracts;
using ProcurementManagement.Domain.Dtos.Quality;
using ProcurementManagement.Domain.ProcurementDomain;

namespace WarehouseManagement.Dtos
{
    public class AreaProFile:Profile
    {

        public AreaProFile()
        {
            //供应商新增dto映射
            CreateMap<Vendor, VendorCreateDtos>().ReverseMap();

            //采购质检申请新增
            CreateMap<ProPcApply, AddProPcApply>().ReverseMap();
            //采购质检申请修改
            CreateMap<ProPcApply, UptProPcApply>().ReverseMap();
                //供应商类别dto映射
            CreateMap<VendorType, VendorTypeDto>().ReverseMap();
            //供应商类别父级iddto映射
            CreateMap<VendorType, VendorTypePidDto>().ReverseMap();
            //供应商列表
            CreateMap<Vendor, VendorShowDtos>().ReverseMap();
            //省份
            CreateMap<Province, Province>().ReverseMap();
            //省份
            CreateMap<City, City>().ReverseMap();
            //采购询价新增
            CreateMap<ProcureEnquiry, ProcureEnquiryCreateDto>().ReverseMap();

            //采购合同新增dto映射
            CreateMap<PurchaseContracts, AddPurchaseContractsDTO>().ReverseMap();
            //采购合同修改dto映射
            CreateMap<PurchaseContracts, UpdPurchaseContractsDTO>().ReverseMap();
            //采购退货
            CreateMap<PurchaseReturns, AddProcurementReturn>().ReverseMap();
            //采购申请添加
            CreateMap<ProcureApply, ProcureApplyCreateDto>().ReverseMap();
            //采购申请修改
            CreateMap<ProcureApply, ProcureApplyUpdDto>().ReverseMap();
            CreateMap<ProcureEnquiry, ProcureEnquiryUpdateDto>().ReverseMap();
            //产品质检添加
            CreateMap<ProductQuality, AddProductQualityDTO>().ReverseMap();
            //采购退款（直接退款表）
            CreateMap<DirectRefund, PurchaseReturnsDTO>().ReverseMap();
            //采购实退退款（修改采购退货表）
            CreateMap<DirectRefund, UpdDirectRefundDTO>().ReverseMap();
        }

    }
}
